package testplan.services;

import java.util.Set;

import testplan.entities.Project;
import testplan.entities.Release;

/**
 * Project services.
 */
public interface ProjectService 
{
	/**
	 * Create a project.
	 * @param name project name
	 * @param agencyId key of the owner agency
	 * @param description project description
	 */
	public void createProject(String name, long agencyId, String description);
	
	/**
	 * Get all the projects owned by the agency.
	 * @param agencyId agency
	 * @return a set of projects
	 */
	public Set<Project> findByAgency(long agencyId);
	
	/**
	 * Delete the project.
	 * @param projectId project id
	 */
	public void deleteProject(long projectId);

    /**
     * Get all the release objects of the the project.
     * @param projectId project
     * @return a set of releases
     */
    public Set<Release> getReleases(long projectId);

    /**
     * Create a release version for a project with initial state {@code NEW}.
     * @param releaseName release name
     * @param projectId project
     */
    public void createRelease(String releaseName, long projectId);

    /**
     * Update release name.
     * @param releaseId release
     * @param releaseName new name
     */
    public void updateRelease(long releaseId, String releaseName);

    /**
     * Update release status.
     * @param releaseId release
     * @param status new status
     */
    public void updateRelease(long releaseId, Release.Status status);

}
